package com.demo.user.mapper;

import com.demo.user.dto.UserDto;
import com.demo.user.dto.UserPageParamDto;
import com.demo.user.entity.User;
import com.demo.user.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author 1
* @description 针对表【bl_user(用户)】的数据库操作Mapper
* @createDate 2023-03-28 19:16:37
* @Entity com.demo.user.vo.UserVo
*/
public interface UserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(UserVo record);

    int insertSelective(UserVo record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserVo record);

    int updateByPrimaryKey(UserVo record);

    User queryUserByUid(Long id);

    int insertUser(User user);

    int insertUserMysql(User user);

    List<Map<String, Object>> queryAllUser();
    //使用注解方式
//    @Select("select * from bl_user")
//    List<User> queryAllUser();
    int updateUser(User user);

    int delUser(Integer id);

    //mybatis批量插入数据:mysql用法，id自增
    int mysqlBatchSaveUser(@Param("userEntityList") List<User> userEntities);

    List<User> page(UserPageParamDto pageParam);

}
